package com.dongnam.quanly.common.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.dongnam.quanly.common.model.enumtype.DonViTinh;
import com.dongnam.quanly.common.model.enumtype.TinhChatVTHH;

@Entity
@Table(name = "VatTuHangHoa")
public class VatTuHangHoa extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "MaVTHH", length = 100)
	private String maVTHH;

	@Column(name = "TenVTHH", length = 100)
	private String tenVTHH;

	@Column(name = "Tinhchat", length = 100)
	@Enumerated(EnumType.STRING)
	private TinhChatVTHH tinhchat;

	@Column(name = "MaLoaiVTHH")
	private String loaiVTHH;

	@Column(name = "DonViTinh", length = 100)
	@Enumerated(EnumType.STRING)
	private DonViTinh donViTinh;

	@Column(name = "ThoiGianBaoHanh")
	private Date thoiGianBaoHanh;

	@Column(name = "DonGiaMua")
	private Double donGiaMua;

	@Column(name = "DonGiaBan")
	private Double donGiaBan;

	@Column(name = "MaDoiTac")
	private String nhaCungCap;

	@Column(name = "TKChiPhi", length = 100)
	private String tKChiPhi;

	@Column(name = "ChietKhauMuaHang")
	private Integer chietKhauMuaHang;

	@Column(name = "DienGiaiMua")
	private String dienGiaiMua;

	@Column(name = "DienGiaiBan")
	private String dienGiaiBan;

	@Column(name = "NguonGoc", length = 100)
	private String nguonGoc;

	@Column(name = "ThueSuat")
	private Integer thueSuat;

	@Column(name = "TaiKhoanKho")
	private Integer taiKhoanKho;

	@Column(name = "TKDoanhThu")
	private Integer tKDoanhThu;

	@Column(name = "ChietKhauBanHang")
	private Integer chietKhauBanHang;

	@Column(name = "CoBaoHanh")
	private Boolean coBaoHanh;

	public VatTuHangHoa() {
		super();

		// TODO Auto-generated constructor stub
	}

	public Boolean getCoBaoHanh() {
		return coBaoHanh;
	}

	public void setCoBaoHanh(Boolean coBaoHanh) {
		this.coBaoHanh = coBaoHanh;
	}

	public String getMaVTHH() {
		return maVTHH;
	}

	public void setMaVTHH(String maVTHH) {
		this.maVTHH = maVTHH;
	}

	public String getTenVTHH() {
		return tenVTHH;
	}

	public void setTenVTHH(String tenVTHH) {
		this.tenVTHH = tenVTHH;
	}

	public TinhChatVTHH getTinhchat() {
		return tinhchat;
	}

	public void setTinhchat(TinhChatVTHH tinhchat) {
		this.tinhchat = tinhchat;
	}

	public DonViTinh getDonViTinh() {
		return donViTinh;
	}

	public void setDonViTinh(DonViTinh donViTinh) {
		this.donViTinh = donViTinh;
	}

	public Date getThoiGianBaoHanh() {
		return thoiGianBaoHanh;
	}

	public void setThoiGianBaoHanh(Date thoiGianBaoHanh) {
		this.thoiGianBaoHanh = thoiGianBaoHanh;
	}

	public Double getDonGiaMua() {
		return donGiaMua;
	}

	public void setDonGiaMua(Double donGiaMua) {
		this.donGiaMua = donGiaMua;
	}

	public Double getDonGiaBan() {
		return donGiaBan;
	}

	public void setDonGiaBan(Double donGiaBan) {
		this.donGiaBan = donGiaBan;
	}

	public String gettKChiPhi() {
		return tKChiPhi;
	}

	public void settKChiPhi(String tKChiPhi) {
		this.tKChiPhi = tKChiPhi;
	}

	public Integer getChietKhauMuaHang() {
		return chietKhauMuaHang;
	}

	public void setChietKhauMuaHang(Integer chietKhauMuaHang) {
		this.chietKhauMuaHang = chietKhauMuaHang;
	}

	public String getDienGiaiMua() {
		return dienGiaiMua;
	}

	public void setDienGiaiMua(String dienGiaiMua) {
		this.dienGiaiMua = dienGiaiMua;
	}

	public String getDienGiaiBan() {
		return dienGiaiBan;
	}

	public void setDienGiaiBan(String dienGiaiBan) {
		this.dienGiaiBan = dienGiaiBan;
	}

	public String getNguonGoc() {
		return nguonGoc;
	}

	public void setNguonGoc(String nguonGoc) {
		this.nguonGoc = nguonGoc;
	}

	public Integer getThueSuat() {
		return thueSuat;
	}

	public void setThueSuat(Integer thueSuat) {
		this.thueSuat = thueSuat;
	}

	public Integer getTaiKhoanKho() {
		return taiKhoanKho;
	}

	public void setTaiKhoanKho(Integer taiKhoanKho) {
		this.taiKhoanKho = taiKhoanKho;
	}

	public Integer gettKDoanhThu() {
		return tKDoanhThu;
	}

	public void settKDoanhThu(Integer tKDoanhThu) {
		this.tKDoanhThu = tKDoanhThu;
	}

	public Integer getChietKhauBanHang() {
		return chietKhauBanHang;
	}

	public void setChietKhauBanHang(Integer chietKhauBanHang) {
		this.chietKhauBanHang = chietKhauBanHang;
	}

	public String getLoaiVTHH() {
		return loaiVTHH;
	}

	public void setLoaiVTHH(String loaiVTHH) {
		this.loaiVTHH = loaiVTHH;
	}

	public String getNhaCungCap() {
		return nhaCungCap;
	}

	public void setNhaCungCap(String nhaCungCap) {
		this.nhaCungCap = nhaCungCap;
	}

	public void fillVthh(VatTuHangHoa vthh) {

		this.maVTHH = vthh.maVTHH;
		this.tenVTHH = vthh.tenVTHH;
		this.tinhchat = vthh.tinhchat;
		this.loaiVTHH = vthh.loaiVTHH;
		this.donViTinh = vthh.donViTinh;
		this.thoiGianBaoHanh = vthh.thoiGianBaoHanh;
		this.donGiaMua = vthh.donGiaMua;
		this.donGiaBan = vthh.donGiaBan;
		this.nhaCungCap = vthh.nhaCungCap;
		this.tKChiPhi = vthh.tKChiPhi;
		this.chietKhauMuaHang = vthh.chietKhauMuaHang;
		this.dienGiaiMua = vthh.dienGiaiMua;
		this.dienGiaiBan = vthh.dienGiaiBan;
		this.nguonGoc = vthh.nguonGoc;
		this.thueSuat = vthh.thueSuat;
		this.taiKhoanKho = vthh.taiKhoanKho;
		this.tKDoanhThu = vthh.tKDoanhThu;
		this.chietKhauBanHang = vthh.chietKhauBanHang;

	}

}
